calculation of transfer function